package com.xbongbong.paas.pojo;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author zcp
 * @date 2021/01/26
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
public class CreditCardBillInfoPojo implements Serializable {
    private static final long serialVersionUID = 7220431128023923860L;
    /**
     * @see com.xbongbong.saas.enums.CreditCardBillTypeEnum
     */
    @NotNull(message = "流水类型不能为空")
    private String type;

    @NotNull(message = "关联单据编号不能为空")
    private Long refId;

    @NotBlank(message="关联单据编号不能为空")
    private String refNo;

    @NotNull(message = "变动金额不能为空")
    private Double amount;

    @NotNull(message = "关联经销商不能为空")
    private Long customerId;

    @NotBlank(message="关联经销商不能为空")
    private String customerName;

    /**
     * 业务类型
     */
    @NotNull(message = "业务类型不能为空")
    private Integer businessType;

    /**
     * 创建人标识: 1 经销商 0 厂商
     */
    private Integer creatorIsDistributor;

    /**
     * 创建者名称
     */
    private String creatorName;

    public CreditCardBillInfoPojo(String type, Long refId, String refNo, Double amount, Long customerId, String customerName, Integer businessType) {
        this.type = type;
        this.refId = refId;
        this.refNo = refNo;
        this.amount = amount;
        this.customerId = customerId;
        this.customerName = customerName;
        this.businessType = businessType;
    }
}
